function testField() {
	var interactor = new zxt.ui.Interactor();	
	var field = new zxt.ui.Field("MYNAME", "MYTITLE", "text", interactor);
	
	assertEquals("", "MYNAME", field.name());
	assertEquals("", "MYTITLE", field.title());
	assertEquals("", "text", field.type());
	assertEquals("", interactor, field.interactor());
	
	field.name("NEWNAME");
	assertEquals("", "NEWNAME", field.name());
	
	field.title("NEWTITLE");
	assertEquals("", "NEWTITLE", field.title());
	
	field.type("label");
	assertEquals("", "label", field.type());
	
	field.interactor(null);
	var it = field.interactor();
	assertTrue( it == null );
	
}	


function testDataForm$OnMessage(){
	
	var dg = new zxt.ui.DataGrid(tmodel, {});	
	
	var created = false;
	var deleted = false;
	var saved = false;
	
	dg._onCreate = function(){ created = true; };	
	dg._onDelete = function(){ deleted = true; };	
	dg._onSave = function(){ saved = true; };	
		
	var msg = new zxt.core.Message($zxt.MESSAGE.WM_OPERATION_INVOKE, {opt : $zxt.Operation.CREATE});	
	dg.onMessage(msg);	
	assertTrue("", created);
	
	var msg = new zxt.core.Message($zxt.MESSAGE.WM_OPERATION_INVOKE, {opt : $zxt.Operation.DELETE});	
	dg.onMessage(msg);	
	assertTrue("", deleted);

	var msg = new zxt.core.Message($zxt.MESSAGE.WM_OPERATION_INVOKE, {opt : $zxt.Operation.SAVE});	
	dg.onMessage(msg);	
	assertTrue("", saved);
	
}		

